// arg0 - instance
var instance;
instance = argument0;

// Write events
for(__i=0;__i<ds_list_size(instance.events);__i+=1)
{
    __event = ds_list_find_value(instance.events, __i);
    readLine('<event type="'+__event.type+'">');
    readActions(__event);
    readLine('</event>');
}
